import $http from '@/assets/js/http' 

//查询我发起的  我的置换--交易列表
export function getmyExchangeList(userId,index,size,lang) {
    return $http.get('/api/myexchange/list', {
        params:{
            userId:userId,
            pageIndex:index,
            pageSize:size,
            lang:lang,
        }
    });
}

//获取我的置换--交易详情
export function getmyExchangeDetail(orderId,lang) {
    return $http.get('/api/myexchange/detail', {
        params:{
            orderId:orderId,
            lang:lang,
        }
    });
}

//我的置换交易---确认 发货
export function postmyExchangeExpress(orderId,expressCompany,expressKey,expressCode,lang) {
    return $http.post('/api/myexchange/express', {
        orderId:orderId,
        expressCompany:expressCompany,
        expressKey:expressKey,
        expressCode:expressCode,
        lang:lang
    });
}

//我的置换交易---确认  收货！
export function postmyExchangeFinish(orderId,lang) {
    return $http.post('/api/myexchange/finish', {
        orderId:orderId,
        lang:lang
    });
}

//我的置换交易---申请关闭
export function postmyExchangeClose(param) {
    return $http.post('/api/myexchange/applyClose', {
        orderId:param.orderId,
        reason:param.reason,
        lang:param.lang
    });
}


//我的置换交易---删除订单
export function postmyExchangeDeleteOrder(orderId,lang) {
    return $http.post('/api/myexchange/delete', {
        orderId:orderId,
        lang:lang
    });
}